/**
 * 
 */
package com.itmayiedu.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.annotation.JsonView;
import com.itmayiedu.annotation.ResponseResult;
import com.itmayiedu.entity.User;

/**
 * @author Administrator
 * @date 2019年5月4日
 */
@RestController
@RequestMapping("/api")
@ResponseResult // 公共接口统一返回({"result":xx,"reason":xxx,"data":xxx}) 格式
public class PublicApiController {

	@GetMapping("/user/query")
	public List<User> getUserList() {
		ArrayList<User> arrayList = new ArrayList<User>();

		User user1 = new User(1, "xiaoming", "123456", "");
		User user2 = new User(2, "xiaohong", "123456", "");
		arrayList.add(user1);
		arrayList.add(user2);

		return arrayList;
	}
}
